package org.metasketch.ham.diagrams.units;

import org.metasketch.editor.toolbox.ISemanticFactory;
import org.metasketch.ham.model.HumanParticipationUnit;
import org.metasketch.ham.model.HumanParticipationUnitType;
import org.metasketch.model.CommonIdentified;

public class ParticipationUnitFactory implements ISemanticFactory {

	HumanParticipationUnitType type;

	public ParticipationUnitFactory(HumanParticipationUnitType type) {
		this.type = type;
	}

	@Override
	public CommonIdentified getNewInstance() {
		HumanParticipationUnit unit = new HumanParticipationUnit();
		unit.setType(type);
		return unit;
	}

	@Override
	public Class getSemanticType() {
		return HumanParticipationUnit.class;
	}

}
